#ifndef SERVER_H
#define SERVER_H

#include <QObject>
#include <QTcpServer>
#include "tcpthread.h"
#include <QMutex>

//先声明窗口的类
class Widget;
class Server: public QTcpServer
{
    Q_OBJECT
public:
        explicit Server(QObject *parent = Q_NULLPTR);
        ~Server();
private:
    void incomingConnection(qintptr sockDesc);//重写函数

signals:

private slots:
    void recvBuffer(const QString &data);
private:
    Widget *m_widget;
    QMutex mutex;
public:
    QList<float> recv_buffer;

};

#endif // SERVER_H
